import request from '@/utils/request'

export default {
  login(data) {
    return request.post('/login', data)
  },
  register(data) {
    return request.post('/register', data)
  },
  getUserInfo() {
    return request.get('/user/info')
  },
  updateUserInfo(data) {
    return request.put('/user/update', data)
  },
  getAddressList() {
    return request.get('/user/address/list')
  },
  addAddress(data) {
    return request.post('/user/address/add', data)
  },
  deleteAddress(id) {
    return request.delete(`/user/address/delete/${id}`)
  }
}